<?php
class Pldkp_Validate_StringLength extends Zend_Validate_Abstract 
{
    const TO_SHORT = 'stringToShort';
    
    protected $_messageTemplates = array(
        self::TO_SHORT => 'String to short'
    );
    
    protected $length;
    
    public function __construct($length) 
    {
        $this->length = $length;
    }
    
    public function isValid($value) 
    {
        
        
        if (strlen($value) < $this->length) {
            $this->_error(self::TO_SHORT);
            return false;
        }
        return true;    
    }
}

    